package com.isoft.filelistener.dao;

import com.isoft.filelistener.entity.DfmeAirlApno;
import com.isoft.filelistener.entity.DfmeAirlDflt;
import com.isoft.filelistener.entity.MetaData;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface DfmeAirlDao {
    //,terminal_apcd,terminal_fptt,terminal_apat,terminal_apno,terminal_apcd,terminal_fplt,terminal_apat
    @Insert("insert into TEAM_03.DFME_AIRL(SENDER,RECEIVER,SEQUENCE,SEND_TIME,TYPE,STYP," +
            "FLIGHT_ID,FLIGHT_IDENTIFITY,FLIGHT_DATE,TERMINAL_APNO,TERMINAL_APCD,TERMINAL_FPTT,TERMINAL_APAT,ARRIVER_APNO,ARRIVER_APCD,ARRIVER_FPLT,ARRIVER_APAT) values(" +
            "#{metaData.sender},#{metaData.receiver},#{metaData.sequence},#{metaData.sendTime},#{metaData.type},#{metaData.styp},#{dflt.flightId},#{dflt.flightIdentifity}" +
            ",#{dflt.flightDate},#{apno1.terminalApno},#{apno1.terminalApcd},#{apno1.terminalFptt},#{apno1.terminalApat},#{apno2.terminalApno},#{apno2.terminalApcd},#{apno2.terminalFplt},#{apno2.terminalApat})")
    int InsertDfmeAfid(@Param("metaData") MetaData metaData, @Param("dflt") DfmeAirlDflt dflt, @Param("apno1") DfmeAirlApno apno1 , @Param("apno2") DfmeAirlApno apno2);
}
